{
  "properties" : { },
  "id" : "270c1c8ff48040419fa17c1e74e437ba",
  "script" : null,
  "groupId" : "db1752dae044456b895d5a690a0f498d",
  "name" : "部署流程",
  "createTime" : null,
  "updateTime" : 1741253206026,
  "lock" : null,
  "createBy" : null,
  "updateBy" : "可辉",
  "path" : "processes",
  "method" : "POST",
  "parameters" : [ {
    "name" : "file",
    "value" : { },
    "description" : null,
    "required" : true,
    "dataType" : "MultipartFile",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  } ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"code\": 500,\n    \"msg\": \"系统内部出现错误\"\n}",
  "description" : "支持流程文件部署，不支持压缩包",
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
import 'org.activiti.engine.RepositoryService' as repositoryService;
import java.io.InputStream;
import org.activiti.engine.repository.Deployment;
import org.activiti.engine.repository.DeploymentBuilder;

var fileName = file.getOriginalFilename().split('\.')[0];
InputStream inpt = file.getInputStream()

DeploymentBuilder deploymentBuilder1 = repositoryService.createDeployment();
deploymentBuilder1.addInputStream(file.getOriginalFilename(), inpt);
deploymentBuilder1.name(fileName);
Deployment deployment1 = deploymentBuilder1.deploy();

inpt.close()

return [deployment1.getId()]